import { get, post, put, patch, deleteReq } from '@/utils/request';

// 文章创建
export function artCreate(data: object) {
    return post({
        url: '/article/create',
        data,
    });
}
// 文章列表
export function artList(data: object) {
    return get({
        url: '/article/find',
        data,
    });
}
// 文章修改
export function artUpdate(id: any, data: object) {
    return patch({
        url: `/article/${id}`,
        data,
    });
}
// 文章删除
export function artDeltele(data: any) {
    return deleteReq({
        url: `/article/${data.id}`,
    });
}
// 获取分类
export function artTypes() {
    return get({
        url: `/types`,
    });
}
// 获取文章详情
export function artDetail(data: object) {
    return get({
        url: `api/article/detail/${data}`,
        data,
    });
}
